## created by vvsong 
## this is a thrift-file for search Server
##
## news.thrift


struct ResultItem{  
  1: string title,  
  2: string url,
  3: double score,
  //4: optional string content, 
  //TODO: other members, but not needed for the moment.
}

struct SearchResult{
  1: i32 total_sum,
  2: i32 show_num,
  3: list<ResultItem> show_result,
}

service newsService{
  SearchResult search(1: string query, 2: i32 show_num),	//search fun: search query
}

